package com.fysports.web.controller.app;

import com.jfinal.plugin.activerecord.Page;
import com.fysports.web.controller.engine.AutoRestFulController;
import com.fysports.web.kit.dtgrid.DTGridView;
import com.fysports.web.model.app.AppFeedback;


/**
 * 用户回馈列表（无需增删查改）
 * Created by konbluesky
 * Date : 14-9-23 下午9:19
 * Project : JdmData_WebServer
 */
public class AppFeedBackController extends AutoRestFulController<AppFeedback> {

    @Override public void load() {
        DTGridView view = getGridView();
        String selector="select u.memberid,u.realname,af.* ";
        String ext=" from app_feedback as af left join user as u on af.useruuid=u.uuid ";
        Page<AppFeedback> list =
                getCtrModel().DTSearchPaginate(view.getNowPage(), view.getPageSize(), selector, ext, null, null);
        renderJson(toGridView(view, list));
    }


    @Override protected AppFeedback getCtrModel() {
        return AppFeedback.dao;
    }


    @Override protected String getRenderPath() {
        return "system/feedback/feedback_";
    }
}
